<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .modal{
            height: 400px;
            width: 200px;
            border: red 4px solid;
            background-color: green;
            top:50%;
            left:50%;
            margin-left: -100px;
            margin-top: -200px;
            position: fixed;
            z-index: 10;
        }
        .shadow{
            top:0;
            left:0;
            bottom:0;
            right: 0;
            position: fixed;
            background-color: black;
            opacity: 0.9;
            z-index: 9;
        }
    </style>
</head>
<body>
    <input type="button" value="添加">
    <div class="shadow"></div>
    <div class="modal">
        <input type="text">
        <input type="text">
        <input type="text">
        <input type="text">
    </div>
    <div style="height: 1000px;background-color:yellow;z-index: 8"></div>

</body>
</html>